﻿using System;

namespace TestExtensions
{
	public interface IHasStatus : IHasXml
	{
		string Status { get; set; }
	}

	public static class IHasStatusExtensions
	{
		public static void LoadStatus(this IHasStatus @this)
		{
			try
			{
				@this.Status = @this.Element.Element("NodeArgs").Attribute("status").Value;
			}
			catch (Exception)
			{
				@this.Status = "Information";
			}
		}
	}
}